
<script src="<?php echo $this->baseUrl() ;?>/scripts/tab/tab.js" type="text/javascript"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/caidat.js" type="text/javascript"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/validate/jquery-latestt.js"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/validate/jquery.validate.js"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/sortertable/jquery.tablesorter.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function() { 
	    $("#danh_sachthu").tablesorter(); 
	});
</script>
<div class ="conten" >

    <table cellpadding="0"  cellspacing="0" class="tableconten" border="0">
        <tr>
            <td class="left_conten" >
            <!-- left  -->
               <div class="module-left">
                      <div class="t_m">
            			<div class="t_r">
            				<h3> 
                                Tạo mới 
            					<a class="toggleicon" href='#'><div onclick="slidetoggle('99')" class='shboxs99 show'><img src="<?php echo $this->baseUrl() ;?>/images/box/down1.png" /></div><div onclick="hslidetoggle('99')" class='hshboxs99 hidden'><img src="<?php echo $this->baseUrl() ;?>/images/box/down2.png" /></div></a>
            				</h3>
            				
            			</div>
            		  </div>
            		  <div id="box99" class="module-content">
            			<ul>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href="<?php echo $this->baseUrl()?>/thumau/themthumau"   >Thêm thư mẫu  </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href="<?php echo $this->baseUrl()?>/lienhe/">Thêm liên hệ</a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href="<?php echo $this->baseUrl()?>/guithu"> Gửi thư </a></li>
            				
            			</ul>
            		  </div>
            		  <div class="module-bottom">
            			<div class="md-bt-r"><div class="md-bt-l">&nbsp;</div></div>
            		  </div>	                  
               </div>
               
               <!-- thao tac 2 -->
               
               <div class="module-left">
                      <div class="t_m">
            			<div class="t_r">
            				<h3> 
                                Danh Sách
            					<a class="toggleicon" href='#'><div onclick="slidetoggle('98')" class='shboxs98 show'><img src="<?php echo $this->baseUrl() ;?>/images/box/down1.png" /></div><div onclick="hslidetoggle('98')" class='hshboxs98 hidden'><img src="<?php echo $this->baseUrl() ;?>/images/box/down2.png" /></div></a>
            				</h3>
            				
            			</div>
            		  </div>
            		  <div id="box98" class="module-content">
            			<ul>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/thunhap/"   >Danh sách thư nháp </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/thumau/index/"   >Danh sách thư mẫu </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/lienhe/" >Danh Sách liên hệ</a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/thudagui/" > Danh sách thư đã gửi </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/danhmuc/" > Danh mục thư </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/tukhoa/" > Danh mục từ khóa </a></li>
            				
            			</ul>
            		  </div>
            		  <div class="module-bottom">
            			<div class="md-bt-r"><div class="md-bt-l">&nbsp;</div></div>
            		  </div>	                  
               </div>                 
               
            <!--  end left--> 
             </td>
            <td class="right_conten" >
            <div class="bao_benphai">
            <!-- right  -->
                <!-- breadcrumd-->
    			<div class="breadcrum" >
    				<ul>
    					<li class="home"><a href="">Cài đặt hệ thống</a></li>
    					<li class="br_item"><span>Quản lý thành viên </span></li>
    				</ul>
    			</div>
		    	<!-- end breadcrumd-->
		    	
		    	<!-- nội dung dang sách -->
<!--  Table  -->
		    	<div id="resultajax">
                     <!-- Tìm kiếm  -->
                     <form action="<?php echo $this->baseUrl() ?>/caidat/alluser?timkiem=thanhvien&id=0" method="post">
                     <div class="timkem_list">
                     	<span class="timthan"> 
                            Tìm kiếm : <img  src="<?php echo $this->baseUrl() ?>/images/icon/search_20x20.png" width="17px" height="17px" align="absmiddle"/> 
                            <span><input type="text" id="tentim" name="keytimkiem" style="width: 300px;" onblur="dung()"  onkeyup="lookup(this.value)" />  <input type="submit" value="Tìm kiếm" class="save"/></span>
                            <!-- Ket qua trả về --> 
                            <div class="suggestionsBox">
                               <div class="suggestionList">                            
                               </div> 
                            </div>
                            <!-- Ket qua trả về --> 
                        </span>
						<div align="center" class="divthaotac" title="Xóa bộ lọc tìm kiếm" > 
	                            <a href="<?php echo $this->baseUrl()?>/caidat/alluser">
	                            	 <span class="xoaboloc"></span>
	                            	 Xóa bộ lọc 
	                            </a>
                        </div>
						<div class="divthaotac" title="Xóa Thành viên" > 
	                            <a href="#" onclick="xoanhieuthanhvien()">
	                            	 <span class="xoatoanbo"></span>
	                            	Sọt rác  
	                            </a>
                        </div>  
                       
    
                     </div>
                    </form>
                     <!-- End Tìm kiếm  -->
                        
					<div class="box-l-n" style="clear:both;">
						<div class="box-l-n-l">
							<div class="box-l-n-r">
								<div class="box-l-n-m" align="left"> <div class="xoa_botton"><input type="button" value="Xóa" class="delete" />    </div> <h3  >Danh sách thành viên </h3></div>
							</div>
						</div>
					<div class="box-l-n-body">
						<div class="box-l-n-wrr">
						<form id="danhsachthanhvien" action="">
		    			<table cellspacing="1" id="danh_sachthu">
							<thead>
							<tr>
								<td width="30" ><input type="checkbox" onclick="selectReverse('danhsachthanhvien','tvid')" style="width: 50px"/></td>
								<th width="20%" ><b>Họ Và Tên </b></th>
								<td ><b>Tên đăng nhập</b></td>
								<td width="10%" ><b>Khóa TV </b></td>
								<td width="12%"><b>Kích hoạt thành viên</b></td>
								<td ><b>Email thành viên</b></td>
								<td width="15%" ><b>Ngày đăng ký</b></td>
								<td ><b>Thao tác</b></td>
							</tr>
							</thead>
							<tbody>
							<?php foreach ($this->thanhvien as $thanhvien ){?>
							<tr class="row_<?php echo $thanhvien['uid'] ?>">
								<td align="center" ><input type="checkbox" id="tvid_" value="<?php echo  $thanhvien['uid'] ?>" name="listtv[]"/></td>
								<td width="20%" ><input type="hidden" id="company" value="" />
									<a href=""#> <b><?php echo $thanhvien['name'] ?></b></a>
								</td>
								<td><?php echo $thanhvien['uname'] ?></td>
								<td width="10%" align="center">
									<?php if ($thanhvien['su_dung'] == 1  ){ ?>
										<samp id='khoa_tv_<?php echo $thanhvien['uid']?>'><a href="#" onclick="khoathanhvien('<?php echo $thanhvien['uid'] ?>','<?php echo $this->iddangnhap;?>','0');" >  
											<img title="Khóa thành viên" src="<?php echo $this->baseUrl() ?>/images/icon/check2.png"  width="17" hight="17" />
										</a></samp>	   
									<?php }else{ ?>
										<samp id='khoa_tv_<?php echo $thanhvien['uid'] ?>'><a href="#" onclick="mothanhvien('<?php echo $thanhvien['uid'] ?>','<?php echo $this->iddangnhap;?>','1');" >
										 	<img title="Cho phép thành viên hoạt động" src="<?php echo $this->baseUrl() ?>/images/icon/notice-alert.png" width="17" hight="17" />
										 <?php }?>
										</a></samp> 
							    </td>
								<td width="12%" align="center">
									<?php if ($thanhvien['kichhoat'] == 1){ ?> 
										<img title="Thành viên đã khích hoạt " src="<?php echo $this->baseUrl() ?>/images/icon/check2.png">   
									<?php }else{ ?>
									   <samp id='kichh_tv_<?php echo $thanhvien['uid']?>'><a href="#" onclick="kichhoatthanhviensms('<?php echo $thanhvien['uid'] ?>','1');" >
									   	<img title="Kích hoạt thành viên bằng tay" src="<?php echo $this->baseUrl() ?>/images/icon/notice-note.png" width="17" hight="17">
									   </a></samp>
									<?php }?>
								</td>
								<td  width="15%"><?php echo $thanhvien['email'] ?></td>
								<td><?php echo $thanhvien['ngay_tao'] ?></td>
								<td align="center">
									<span id="spancaidai_<?php echo $thanhvien['uid']?>"><a href="#" onclick="checkedituser('<?php echo $thanhvien['uid']?>','<?php echo $thanhvien['kichhoat'] ?>');"  >
										<img title="Cài đặt thông tin thành viên" src="<?php echo $this->baseUrl() ?>/images/icon/icon-16-config.png"> 
									</a> </span>
									&nbsp;&nbsp;
									<a href="#" onclick="xoathanhvien('<?php echo $thanhvien['uid'] ?>')">
									<img title="Xóa thành viên" src="<?php echo $this->baseUrl() ?>/images/icon/icon-16-delete.png"></a>

								</td>
							</tr>
								<?php }?>				
							</tbody>
						</table>
						</div>
						<!--  Phân Trang  -->
				    	<?php 
				    	echo $this->paginationControl($this->paginator,
		                                    'Sliding',
		                                    'pagination.phtml');
				    	 ?>
				    	<!--  end Trang  -->						
						
					</div>
			   </div>
			</div>
				<input type="hidden" value="<?php echo $this->baseUrl()?>" id="url"/>
				<input type="hidden" value="<?php echo $this->iddangnhap;?>" id="iddn"/>
		    	<!--  End tabale -->		    	
		    	<!-- end nội dung dang sách -->

		   <!-- Phân trang -->
		   		
		   <!-- End Phân trang --> 		

		    	
		    </div>	
            <!-- right -->
            </td>
            
        </tr>
    
    </table>
    </form>
</div>



